// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'PeriodInventoryId',
                editTable:true ,
        footer: "Foots",
        cnName: '仓存初始化表',
        name: 'PeriodInventory',
        newTabEdit: false,
        url: "/PeriodInventory/",
        sortName: "PeriodInventoryId",
        fixedSearch:false
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"PeriodYear":"","PeriodMonth":"","MaterialNo":"","MaterialName":"","Spec":"","IsLoted":"","LotText":"","StockId":"","IsLocation":"","LocationId":"","UnitId":"","StartQty":"","StartAmount":"","CostPrice":"","IsAssistUnit":"","UnitConvertTypeId":"","ConversionRate":"","AssistUnitId":"","AssistUnitQty":""};
    const editFormOptions = [[{"title":"规格型号","field":"Spec","readonly":true},
                               {"title":"批号","field":"LotText","type":"selectTable"},
                               {"dataKey":"仓位","data":[],"title":"仓位标识","field":"LocationId","type":"select"},
                               {"dataKey":"单位换算方式","data":[],"title":"单位换算方式","field":"UnitConvertTypeId","readonly":true,"type":"text"},
                               {"title":"单位换算率","field":"ConversionRate","readonly":true,"type":"decimal"},
                               {"dataKey":"计量单位","data":[],"title":"辅助单位标识","field":"AssistUnitId","readonly":true,"type":"select"},
                               {"title":"辅助单位数量","field":"AssistUnitQty","type":"decimal"},
                               {"title":"会计年度","required":true,"field":"PeriodYear","readonly":true,"type":"number"},
                               {"title":"会计期间","required":true,"field":"PeriodMonth","readonly":true,"type":"number"},
                               {"title":"物料编码","required":true,"field":"MaterialNo","readonly":true},
                               {"title":"物料名称","required":true,"field":"MaterialName","readonly":true},
                               {"dataKey":"是否","data":[],"title":"是否启用批次","required":true,"field":"IsLoted","readonly":true,"type":"select"},
                               {"dataKey":"仓库new","data":[],"title":"仓库标识","required":true,"field":"StockId","type":"select"},
                               {"dataKey":"是否","data":[],"title":"是否启用仓位","required":true,"field":"IsLocation","readonly":true,"type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"计量单位标识","required":true,"field":"UnitId","readonly":true,"type":"select"},
                               {"title":"期初数量","required":true,"field":"StartQty","type":"decimal"},
                               {"title":"期初余额","required":true,"field":"StartAmount","type":"decimal"},
                               {"title":"单位成本","required":true,"field":"CostPrice","type":"decimal"},
                               {"dataKey":"是否","data":[],"title":"是否辅助单位","required":true,"field":"IsAssistUnit","readonly":true,"type":"select"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'PeriodInventoryId',title:'期初余额表标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'PeriodYear',title:'会计年度',type:'int',width:110,readonly:true,edit:{type:''},require:true,align:'left'},
                       {field:'PeriodMonth',title:'会计期间',type:'int',width:110,readonly:true,edit:{type:''},require:true,align:'left'},
                       {field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'MaterialNo',title:'物料编码',type:'string',width:120,readonly:true,edit:{type:''},require:true,align:'left'},
                       {field:'MaterialName',title:'物料名称',type:'string',width:120,readonly:true,edit:{type:''},require:true,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:120,readonly:true,edit:{type:''},align:'left'},
                       {field:'IsLoted',title:'是否启用批次',type:'int',bind:{ key:'是否',data:[]},width:80,readonly:true,edit:{type:'select'},require:true,align:'left'},
                       {field:'LotMasterDetailId',title:'批次明细标识',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'LotText',title:'批号',type:'string',width:180,edit:{type:'selectTable'},align:'left'},
                       {field:'StockId',title:'仓库标识',type:'int',bind:{ key:'仓库new',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'IsLocation',title:'是否启用仓位',type:'int',bind:{ key:'是否',data:[]},width:110,readonly:true,edit:{type:'select'},require:true,align:'left'},
                       {field:'LocationId',title:'仓位标识',type:'int',bind:{ key:'仓位',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'UnitId',title:'计量单位标识',type:'int',bind:{ key:'计量单位',data:[]},width:110,readonly:true,edit:{type:'select'},require:true,align:'left'},
                       {field:'StartQty',title:'期初数量',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'StartAmount',title:'期初余额',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'CostPrice',title:'单位成本',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'IsAssistUnit',title:'是否辅助单位',type:'int',bind:{ key:'是否',data:[]},width:110,readonly:true,edit:{type:'select'},require:true,align:'left'},
                       {field:'UnitConvertTypeId',title:'单位换算方式',type:'int',bind:{ key:'单位换算方式',data:[]},width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'ConversionRate',title:'单位换算率',type:'decimal',width:110,readonly:true,edit:{type:'decimal'},align:'left'},
                       {field:'AssistUnitId',title:'辅助单位标识',type:'int',bind:{ key:'计量单位',data:[]},width:110,readonly:true,edit:{type:'select'},align:'left'},
                       {field:'AssistUnitQty',title:'辅助单位数量',type:'decimal',width:110,edit:{type:'decimal'},align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}